package com.zzyl.nursing.job;

import com.zzyl.nursing.service.IContractService;
import com.zzyl.nursing.service.impl.ContractServiceImpl;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;

import java.time.LocalDateTime;

/**
 * @author shc
 * @version 1.0
 * @since 2025-08-13-16:03
 */
@Component
@Slf4j
public class HelloJob {

    @Autowired
    private IContractService contractService;

    public void testJob() {
        log.error("任务开始执行{}", LocalDateTime.now());
    }


    public void updateJob() {
        contractService.updateContractStatus();
        log.error("合同状态更新成功");
    }
}
